package com.dhcc.sds.base.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.plugins.Page;
import com.dhcc.core.framework.base.service.IBaseService;
import com.dhcc.core.framework.result.node.ZTreeNode;
import com.dhcc.sds.base.entity.SdsQcformItemEntity;

import java.util.List;
import java.util.Map;

/**
 * 表单项目表表数据服务层接口
 * 
 * @ClassName: ISdsQcformItemService
 * @Description: TODO
 * @author sunyingjie
 * @date 2021-03-22 10:10:46
 */
public interface ISdsQcformItemService  extends IBaseService<SdsQcformItemEntity> {
	
    List<SdsQcformItemEntity> page(Page<SdsQcformItemEntity> page,Map<String, Object> map);
    List<SdsQcformItemEntity> list(Map<String, Object> map);
    SdsQcformItemEntity getInfoById(Long itemId);
    JSONObject getFormItemMap(Long entityId);
    JSONArray getSourceFieldMap(Long entityId, Long linkStandSubId);
    JSONArray getDicMapBySourceId(Long entityId);
    String creatFormHtml(Long entityId);
    void importItem(Long entityId, List<List<Object>> all);
    void importDic(Long entityId, List<List<Object>> all);
    void importRule(Long entityId, List<List<Object>> all);
    int syncDataConfig(Long entityId);
    int syncItemDefault(Long entityId);

    /**
     * 获取表单项目树形结构
     * @return
     */
    List<ZTreeNode> getItemTree(Long entityId);
}
